</head>
<body>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
  <h2 class="u-tt">{$action_name}站点</h2>
  <ul id="tabs">
    <li> <a class="z-crt" href="#tab1"><span class="icon">&#xf05a;</span> 基本信息</a></li>
	<li><a href="{$url(admin_list/index)}"><span class="icon">&#xf101;</span> 站点列表</a></li>
  </ul>
</div>
<div class="f-sep10"></div>
<div class="m-form">
  <form action="<?php echo url('admin_list/'.$action.'_save'); ?>" method="post" id="form">
    <fieldset>
      <div class="formitm">
        <label class="lab" >站点名称：</label>
        <div class="ipt">
          <input name="SITE_NAME" type="text" class="u-ipt" value="{$info.SITE_NAME}" datatype="s1-20" errormsg="帐号至少1~20个字符！" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <?php if($action=='add'){ ?>
	  <div class="formitm">
        <label class="lab" >站点标识：</label>
        <div class="ipt">
          <input name="SITE_MARK" type="text" class="u-ipt" value="{$info.SITE_MARK}" datatype="s1-20" errormsg="帐号至少1~20个字符！" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <?php }else{ ?>
	  <input name="SITE_MARK" type="hidden" value="{$info.SITE_MARK}">
	  <?php } ?>
	  <div class="formitm">
        <label class="lab" >绑定域名：</label>
        <div class="ipt">
          <input name="SITE_DOMAIN" type="text" class="u-ipt" id="SITE_DOMAIN" value="{$info.SITE_DOMAIN}" datatype="s1-20" errormsg="帐号至少1~20个字符！" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <?php if($action=='add'){ ?>
	  <div class="formitm">
        <label class="lab" >建立数据：</label>
        <div class="ipt">
            <input name="data" type="radio" value="1" checked="checked" />
            是
            &nbsp;&nbsp;
            <input name="data" type="radio" value="0" />
            否
          <span class="Validform_checktip">按照以下信息建立初始数据</span> </div>
      </div>
	  <?php } ?>
	  <div class="formitm">
        <label class="lab" >数据库地址：</label>
        <div class="ipt">
          <input name="DB_HOST" type="text" class="u-ipt" value="{$info.DB_HOST empty='localhost'}" datatype="s1-20" errormsg="数据库地址不能为空" id="DB_HOST" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >数据库帐号：</label>
        <div class="ipt">
          <input name="DB_USER" type="text" class="u-ipt" id="DB_USER" value="{$info.DB_USER empty='root'}" datatype="s1-20" errormsg="数据库帐号不能为空" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >数据库密码：</label>
        <div class="ipt">
          <input name="DB_PWD" type="text" class="u-ipt" value="{$info.DB_PWD}" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >数据库端口：</label>
        <div class="ipt">
          <input name="DB_PORT" type="text" class="u-ipt" value="{$info.DB_PORT empty='3306'}" datatype="s1-20" errormsg="数据库端口不能为空" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >数据库名称：</label>
        <div class="ipt">
          <input name="DB_NAME" type="text" class="u-ipt" value="{$info.DB_NAME}" datatype="s1-20" errormsg="数据库名称不能为空" />
          <span class="Validform_checktip"></span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >数据库前缀：</label>
        <div class="ipt">
          <input name="DB_PREFIX" type="text" class="u-ipt" id="DB_PREFIX" value="{$info.DB_PREFIX}" datatype="s1-20" errormsg="数据库名称不能为空" />
		  <?php if($action=='add'){ ?>
          <span class="Validform_checktip">选择建立数据时将随机生成</span> 
		  <?php }else{ ?>
		   <span class="Validform_checktip">修改不会改变数据库中的前缀</span> 
		  <?php } ?>
		  </div>
      </div>
      <div class="formitm formitm-1">
        <button class="u-btn" id="submit" type="submit">保存修改</button>
        <button class="u-btn u-btn-c4" id="reset" type="button">重置</button>
        <span id="tip" class="load"></span> </div>
    </fieldset>
    <input name="uid" type="hidden" value="{$info.uid}" />
  </form>
</div>
</body>
<script>
Do.ready('base','form','tabs','dialog', function() {
	saveform('{$url(admin_list/index)}');
	tabs();
});
</script>